package com.com.typhoon.controller.rest;

import com.com.typhoon.entity.User;
import com.com.typhoon.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author shuya | dongfeng.zdf@alibaba-inc.com
 * @description
 * @date 2018/10/23 下午2:24
 * @description
 * @modified by
 * @since V2.0.0
 */
@RestController
public class RestApiController {
    @Autowired
    private UserService userService;

    /**
     * Handle request to the default page
     */
    @GetMapping("/")
    public List<User> viewHome() {

        return userService.findAllUsers();
    }

}
